<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="width=device-width,user-scalable=no"name="viewport">
<title>店主认证</title>
<link rel="stylesheet" type="text/css" href="<?php echo C('WEB_URL');?>Public/customer/css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo C('WEB_URL');?>Public/customer/css/style.css" />
<link rel="stylesheet" type="text/css" href="<?php echo C('WEB_URL');?>Public/customer/css/bootstrap.min.css" />
<script type="text/javascript" charset="UTF-8" src="<?php echo C('WEB_URL');?>Public/customer/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo C('WEB_URL');?>Public/customer/js/bootstrap.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo C('WEB_URL');?>Public/customer/js/script.js"></script>
</head>
<body>
<div id="box">
 <div class="navbar navbar-default navbar-fixed-top">
  <header>
   <h1><a href="more.html"><span class="glyphicon glyphicon-menu-left"></span></a></h1>
   <p class="title">店主认证</p>
  </header>
 </div><!--navbar-fixed-top-->
 <div class="approveTwo">
 <div class="appHead">
  <p class="headBig">第二步 店铺信息<span><a href="#">2</a>/3</span></p>
  <p>为保障您的账户安全，请务必填写您的真实店铺资料</p>
 </div><!--appHead-->
 <form   id='myForm' method="post" enctype="multipart/form-data">
 <div class="appContent">
  <h6><img src="<?php echo C('WEB_URL');?>Public/customer/images/approve_03.jpg" /></h6>
  <form action="#" method="post">
   <div class="approve">
    <label>店铺名</label>
    <input type="text" name="name" placeholder="请输入您的店铺名" />
   </div>
   <div class="approve">
    <label>店铺电话</label>
    <input type="tel" name="tel" placeholder="请输入店铺电话" />
   </div>
   <div class="approve">
    <label>店铺地址</label>
    <input type="text" name="address" placeholder="请选择您的店铺地址" />
   </div>	
  </form>
  <h5><a href="approve.html">上一步</a><a  id='cun'>下一步</a></h5>
 </div><!--appContent-->
 </form>
</div>
 <div class="navbar navbar-default navbar-fixed-bottom">
   <footer>
    <dl>
     <dt><a href="cardBag.html"><img src="<?php echo C('WEB_URL');?>Public/customer/images/mores_15.jpg" /></a></dt>
     <dd><a href="cardBag.html">首页</a></dd>
    </dl>
    <dl>
     <dt><a href="<?php echo U('User/recommends');?>"><img src="<?php echo C('WEB_URL');?>Public/customer/images/mores_17.jpg" /></a></dt>
     <dd><a href="<?php echo U('User/recommends');?>">推荐有奖</a></dd>
    </dl>
    <dl>
     <dt><a href="more.html"><img src="<?php echo C('WEB_URL');?>Public/customer/images/mores_19.jpg" /></a></dt>
     <dd><a href="more.html" class="current">更多</a></dd>
    </dl>
   </footer>
  </div><!--/navbar-->
</div><!--box-->
<script type="text/javascript" charset="UTF-8">
//微信判断header是否显示
if(isWeiXin()){ 
//alert("====");
$(".title").hide();
} 
else{
//alert("+++++");
}	

 function check_form(form_id) {
              last_submit = $('#' + form_id).data('last_submit');
              current_submit = new Date().getTime();
              if (last_submit == undefined) {
                $('#' + form_id).data('last_submit', new Date().getTime());
              } else {
                if (current_submit - last_submit > 600) {
                  $('#' + form_id).data('last_submit', new Date().getTime());
                } else {
                  return false;
                }
              }
              if ( typeof (tinyMCE) != 'undefined') {
                tinyMCE.triggerSave(true);
              }

              var check_flag = true;
              $("#" + form_id + " :input").each(function(i) {
                if ($(this).attr("check")) {
                  if (!validate($(this).val(), $(this).attr("check"))) {
                    ui_error($(this).attr("msg"));
                    $(this).focus();
                    check_flag = false;
                    return check_flag;
                  }
                }
              });
              return check_flag;
            }


      function sendForm(formId, post_url, return_url) {
            if (check_form(formId)) {
              //绑定beforeunload事件
              $(window).unbind('beforeunload', null);
              if ($("#ajax").val() == 1) {
                var vars = $("#" + formId).serialize();
                $.ajax({
                  type : "POST",
                  url : post_url,
                  data : vars,
                  dataType : "json",
                  success : function(data) {
                    if (data.status) {
                      ui_alert(data.info, function() {
                        if (return_url) {
                          location.href = return_url;
                        }
                      });
                    } else {
                      ui_error(data.info);
                    }
                  }
                });
              } else {
                $("#" + formId).attr("action", post_url);
                if (return_url) {
                  set_cookie('return_url', return_url);
                }
                $("#" + formId).submit();
              }
            }
          }
          $('#cun').click(function(){
            sendForm("myForm","<?php echo U('User/approve3');?>");
          })
</script>
</body>
</html>